<!-- Columns -->
<div id="cols" class="box"> 

    <!-- Aside (Left Column) -->
    <div id="aside" class="box">
        <div class="padding box"> 

            <!-- Logo (Max. width = 200px) -->
            <p id="logo"><a href="#"><?php echo $this->Html->image('logo.gif', array('alt' => 'logo')) ?></a></p>

            <!-- Search -->
            <form action="#" method="get" id="search">
                <fieldset>
                    <legend>Busqueda</legend>
                    <p>
                        <input type="text" size="17" name="" class="input-text" />
                        &nbsp;
                        <input type="submit" value="BUSCAR" class="input-submit-02" />
                   <!-- /search-options -->
                </fieldset>
            </form>
        </div>
        <!-- /padding -->

        <ul class="box">
            <li id="submenu-active"><a href="#">LISTA EMPLEADOS</a></li>
            <li><?php echo $this->Html->link('REGISTRAR EMPLEADO', array('action' => 'insertar')); ?></li>
            <li><a href="#">IMPRIMIR LISTA EMPLEADOS</a></li>
        </ul>
    </div>
    <!-- /aside -->
    <hr class="noscreen" />
    <!-- Content (Right Column) -->
    <div id="content" class="box">
        <h1>Empleados</h1>
        <table>
            <tr>
                <th>Nro</th>
                <th>Nombre</th>
                <th>Estado</th>
                <th>Tel&eacute;fono</th>
                <th>Direcci&oacute;n</th>
                <th>Acciones</th>
            </tr>
            <?php
            $i = 1;
            
            ?>
            <?php foreach ($empleados as $emp): ?>
            
                <?php $estado = ($emp['Empleado']['estado'] == 1) ? "activo" : "inactivo"; ?>
                <?php $clasestado = ($emp['Empleado']['estado'] == 1)? "class=tag" : "class=high";?>
                <tr <?php echo fmod($i, 2) ? "class = bg" : "";?>>
                    <td><?php
                echo $i;
                $i++;
                ?></td>
                    <td><?php echo $emp['Empleado']['nombre']; ?></td>
                    <td><span <?php echo  $clasestado;?>><?php echo $estado; ?></span></td>
                    <td><?php echo $emp['Empleado']['telefono']; ?></td>
                    <td><?php echo $emp['Empleado']['direccion']; ?></td>
                    <td style="font-size:10px;">
                        <?php echo $this->Html->link('EDITAR',array('action' => 'editar', $emp['Empleado']['id']), array('class' => 'inner_a')); ?>&nbsp;
                        <?php if($estado == "activo"):?>
                        <?php echo $this->Html->link('DAR BAJA',array('action' => 'baja', $emp['Empleado']['id']), array('class' => 'inner_a')); ?>&nbsp;
                        <?php else:?>
                        <?php echo $this->Html->link('DAR ALTA',array('action' => 'alta', $emp['Empleado']['id']), array('class' => 'inner_a')); ?>&nbsp;
                        <?php endif;?>
                    </td>
                </tr>
              
            <?php endforeach; ?>

        </table>

    </div>
    <!-- /content --> 

</div>
<!-- /cols -->
